package marvin.webapp.audio.action;

import java.io.IOException;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;


import marvin.webapp.common.util.WebPageURLs;

import org.primefaces.event.TabChangeEvent;

@ManagedBean
@SessionScoped
public class MobileHeaderAction{
	
	@PostConstruct
	public void load() {
	}
	
	public void goToClients(){
		try {
			FacesContext.getCurrentInstance().getExternalContext().redirect(WebPageURLs.AUDIO_MOBILE_PAGE);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void goToAudio(){
		try {
			FacesContext.getCurrentInstance().getExternalContext().redirect(WebPageURLs.AUDIO_AUDIO_PAGE);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void goToHome(){
		try {
			FacesContext.getCurrentInstance().getExternalContext().redirect("/marvin");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void goToShopping(){
		try {
			FacesContext.getCurrentInstance().getExternalContext().redirect(WebPageURLs.SHOPPING_MOBILE_PAGE);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
